![]() |
MPSetTaskState |
||||
Header: | Multiprocessing.h | Carbon status: | Supported | |
Sets state information for a suspended task.
OSStatus MPSetTaskState ( MPTaskID task, MPTaskStateKind kind, void *info );
The task whose state information you want to set.
The kind of state information you want to set. See
A pointer to a data structure holding the state information you want to set. The format of the data structure varies depending on the state information you want to set. See the header file MachineExceptions.h for the formats of the various state information structures.
A result code. If you specify kMPTaskState32BitMemoryException for the state information, this function returns kMPInsufficientResourcesErr, since the exception state information is read-only. Attempting to set state information for a running task will also return kMPInsufficientResourcesErr.
You can use this function to set register contents or exception information for a particular task. However, some state information, such as the exception information (as specified by kMPTaskState32BitMemoryException) as well as the MSR, ExceptKind, DSISR, and DAR machine registers (specified under kMPTaskStateMachine) are read-only. Attempting to set the read-only machine registers will do nothing, while attempting to set the exception information will return an error.
Also see the function MPExtractTaskState.
Introduced with Multiprocessing Services 2.0.
Supported in Carbon. Available in CarbonLib 1.0 and later when MPLibrary 2.0 or later is installed. Exported by CarbonLib 1.0 and later and by MPLibrary 2.0 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/6/2000)